{extend name="base/common"}

{block name="style"}
<style>
    .mail-box .mail-ontact{
        width: 150px;
        min-width: 150px;
        overflow: hidden;
    }
    .mail-box .mail-subject{
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 124px !important;
        min-width: 124px;
    }
    .mail-subject-div{
        width: 100px;
        max-width: 100px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mail-box .mail-main{
        width: calc(100% - 460px);
        position: absolute;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mail-date{
        width: 160px;
        min-width: 160px;
        overflow: hidden;
    }
    @media only screen and (max-width: 550px){
        .mail-date{
            display: none;
        }
    }
    .list_banner {width: 80px}
    .list_type {width: 80px}
</style>
{/block}

{block name="page-header"}

{/block}

{block name="main"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="mail-box-header">
            <form method="get" action="index.html" class="pull-right mail-search">
                <div class="input-group">
                    <input type="text" class="form-control input-sm" name="search" placeholder="搜索标题">
                    <div class="input-group-btn">
                        <button type="submit" class="btn btn-sm btn-primary">搜索</button>
                    </div>
                </div>
            </form>
            <h2>应用管理 ({$list->total()})</h2>
            <div class="mail-tools tooltip-demo m-t-md">
                <input class="i-checks check-all" type="checkbox">
                <button class="btn btn-white btn-sm m-l ajax-post" url="{:Url('del')}" data-original-title="删除"
                        data-toggle="tooltip" data-placement="top" target-form="ids"><i class="fa fa-trash-o"></i>
                </button>
                <!--<button class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="top"><i class="fa fa-eye" style="margin-left: 3px"></i> </button>-->
                <a href="{:Url('add')}" class="btn btn-white btn-sm" ><i class="fa fa-file-text-o"></i> 添加应用</a>
            </div>
        </div>
        <div class="mail-box">
            <table class="table table-hover table-mail">
                <thead>
                <tr>
                    <th></th>
                    <th>id</th>
                    <th>应用名称</th>
                    <th>图片</th>
                    <th>地址</th>
                    <th>类型</th>
                    <th>所属园区</th>
                    <th>支付宝</th>
                    <th>银行卡</th>
                    <th>状态</th>
                </tr>
                </thead>
                <tbody>
                {volist name="list" id="list"}
                <tr>
                    <td class="check-mail">
                        <input type="checkbox" class="i-checks ids" name="ids[]" value="{$list.id}">
                    </td>
                    <td><a href="{:Url('add','id='.$list.id)}">{$list.id}</a></td>
                    <td><a href="{:Url('add','id='.$list.id)}">{$list.name}</a></td>
                    <td><a href="{:Url('add','id='.$list.id)}">{$list.img}</a></td>
                    <td><a href="{:Url('add','id='.$list.id)}">{$list.path}</a></td>
                    <td><a href="{:Url('add','id='.$list.id)}">{$list.type_text}</a></td>
                    <td><a href="{:Url('add','id='.$list.id)}">
                        {volist name="list.park_id" id="parkname"}
                        <span>{$parkname}</span>
                        {/volist}
                    </a>
                    </td>
                    <td><a href="{:Url('add','id='.$list.id)}">{$list.has_alipay_text}</a></td>
                    <td><a href="{:Url('add','id='.$list.id)}">{$list.has_bank_text}</a></td>
                    {eq name="$list.status" value="1"}
                    <td><span class="label label-info">启用</span></td>
                    {else/}
                    <td><span class="label label-danger">禁用</span></td>
                    {/eq}

                </tr>
                {/volist}
                </tbody>
                <tfoot>
                <tr>
                    <td colspan="10">
                        <div class="page">{$page}</div>
                    </td>
                </tr>
                </tfoot>
            </table>

        </div>
    </div>
</div>
{/block}

{block name="script"}
<script src="/admin/js/plugins/iCheck/icheck.min.js"></script>
<script>
    $(document).ready(function(){
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
        $(".check-all").on("ifChanged",function(){
            $("tbody").find(".ids").iCheck("toggle");
        });
    });

</script>
{/block}